package view;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import view.MultipleStringDialog.ExitOption;

/**
 * @author REMY Timothée and CARTIER Arthur
 * 
 */
public class ActionListenerExitButton implements ActionListener {

	MultipleStringDialog msd;
	ExitOption exitOption;

	public ActionListenerExitButton(final MultipleStringDialog msd,
			final ExitOption exitOption) {
		super();
		this.msd = msd;
		this.exitOption = exitOption;
	}

	/**
	 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
	 * @param e
	 */
	@Override
	public void actionPerformed(final ActionEvent e) {
		msd.setExitOption(exitOption);
		msd.dispose();

	}

}
